from microbit import *
while True:
    reading = accelerometer.get_z()
    if reading > 20:
        display.show("R")
    elif reading < -20:
        display.show("L")
    else:
        display.show("-")
# 在这里写上你的代码 :-)
